<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>onEvents</title>
    <link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
    <link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
    <script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
            
                <h1><img src="..&#x2F;assets/css/logo.png" title=""></h1>
            
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: </em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
    <h2 class="off-left">APIs</h2>
    <div id="api-tabview" class="tabview">
        <ul class="tabs">
            <li><a href="#api-classes">Classes</a></li>
            <li><a href="#api-modules">Modules</a></li>
        </ul>

        <div id="api-tabview-filter">
            <input type="search" id="api-filter" placeholder="Type to filter APIs">
        </div>

        <div id="api-tabview-panel">
            <ul id="api-classes" class="apis classes">
            
                <li><a href="..&#x2F;classes/Dialog.html">Dialog</a></li>
            
                <li><a href="..&#x2F;classes/Editor.html">Editor</a></li>
            
                <li><a href="..&#x2F;classes/Explorer.html">Explorer</a></li>
            
                <li><a href="..&#x2F;classes/Global_Variables.html">Global_Variables</a></li>
            
                <li><a href="..&#x2F;classes/Menu.html">Menu</a></li>
            
                <li><a href="..&#x2F;classes/onEvents.html">onEvents</a></li>
            
                <li><a href="..&#x2F;classes/Plugin.html">Plugin</a></li>
            
                <li><a href="..&#x2F;classes/Plugins.html">Plugins</a></li>
            
                <li><a href="..&#x2F;classes/Resource.html">Resource</a></li>
            
                <li><a href="..&#x2F;classes/RunJS.html">RunJS</a></li>
            
                <li><a href="..&#x2F;classes/Utils.html">Utils</a></li>
            
            </ul>

            <ul id="api-modules" class="apis modules">
            
            </ul>
        </div>
    </div>
</div>

            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
        Show:
        <label for="api-show-inherited">
            <input type="checkbox" id="api-show-inherited" checked>
            Inherited
        </label>

        <label for="api-show-protected">
            <input type="checkbox" id="api-show-protected">
            Protected
        </label>

        <label for="api-show-private">
            <input type="checkbox" id="api-show-private">
            Private
        </label>
        <label for="api-show-deprecated">
            <input type="checkbox" id="api-show-deprecated">
            Deprecated
        </label>

    </div>


            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
                        <h1>onEvents Class</h1>
<div class="box meta">
    

    

    
        <div class="foundat">
            Defined in: <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l1"><code>js\onEvents.js:1</code></a>
        </div>
    

    

    
</div>



<div class="box intro">
    <p>系统事件，个模块在某特定条件下自动触发的事件，为了更便于查看，将 <a href="..\classes\Plugins.html" class="crosslink">Plugins</a> 中的 onEvents 抽离出来单独说明</p>
</div>



<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

        
            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
        
        
        
        
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

            
                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                        
                            <li class="index-item method">
                                <a href="#method_beforeContextMenuLoad">beforeContextMenuLoad</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onContextMenuLoad">onContextMenuLoad</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onContextMenuRemove">onContextMenuRemove</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onCssCursorActivity">onCssCursorActivity</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onCssEditorChange">onCssEditorChange</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onDialogLoad">onDialogLoad</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onEditorViewInit">onEditorViewInit</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onExplorerViewInit">onExplorerViewInit</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onHtmlCursorActivity">onHtmlCursorActivity</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onHtmlEditorChange">onHtmlEditorChange</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onJsCursorActivity">onJsCursorActivity</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onJsEditorChange">onJsEditorChange</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onMenuViewInit">onMenuViewInit</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_onScriptImport">onScriptImport</a>

                                
                                
                            </li>
                        
                    </ul>
                </div>
            

            

            

            
        </div>

        
            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

                
                    <div id="method_beforeContextMenuLoad" class="method item">
    <h3 class="name"><code>beforeContextMenuLoad</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>menu</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l52"><code>js\onEvents.js:52</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>上下文菜单显示前调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">menu</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>上下文菜单jQuery包装对象</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onContextMenuLoad" class="method item">
    <h3 class="name"><code>onContextMenuLoad</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>menu</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l34"><code>js\onEvents.js:34</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>上下文菜单加载后调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">menu</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>上下文菜单jQuery包装对象</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onContextMenuRemove" class="method item">
    <h3 class="name"><code>onContextMenuRemove</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>menu</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l43"><code>js\onEvents.js:43</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>上下文菜单消失后调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">menu</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>上下文菜单jQuery包装对象</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onCssCursorActivity" class="method item">
    <h3 class="name"><code>onCssCursorActivity</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>cm</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l124"><code>js\onEvents.js:124</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>当Css编辑器中光标变动时调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">cm</code>
                        <span class="type">CodeMirror</span>
                    

                    

                    <div class="param-description">
                        <p>CodeMirror 实例，当前的CSS编辑器</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onCssEditorChange" class="method item">
    <h3 class="name"><code>onCssEditorChange</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>cm</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l97"><code>js\onEvents.js:97</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>当CSS编辑器内容变化时调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">cm</code>
                        <span class="type">CodeMirror</span>
                    

                    

                    <div class="param-description">
                        <p>CodeMirror 实例，当前的CSS编辑器</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onDialogLoad" class="method item">
    <h3 class="name"><code>onDialogLoad</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>dialog</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l61"><code>js\onEvents.js:61</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>当对话框弹出后调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">dialog</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>Zebra Dialog 窗口实例</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onEditorViewInit" class="method item">
    <h3 class="name"><code>onEditorViewInit</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>editor</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l7"><code>js\onEvents.js:7</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>当编辑器视图初始化或重置后时调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">editor</code>
                        <span class="type"><a href="..\classes\Editor.html" class="crosslink">Editor</a></span>
                    

                    

                    <div class="param-description">
                        <p>编辑器模块实例</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onExplorerViewInit" class="method item">
    <h3 class="name"><code>onExplorerViewInit</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>explorer</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l25"><code>js\onEvents.js:25</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>当左边的资源管理器初始化或重置后调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">explorer</code>
                        <span class="type"><a href="..\classes\Explorer.html" class="crosslink">Explorer</a></span>
                    

                    

                    <div class="param-description">
                        <p>资源管理器模块实例</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onHtmlCursorActivity" class="method item">
    <h3 class="name"><code>onHtmlCursorActivity</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>cm</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l106"><code>js\onEvents.js:106</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>当Html编辑器中光标变动时调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">cm</code>
                        <span class="type">CodeMirror</span>
                    

                    

                    <div class="param-description">
                        <p>CodeMirror 实例，当前的HTML编辑器</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onHtmlEditorChange" class="method item">
    <h3 class="name"><code>onHtmlEditorChange</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>cm</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l79"><code>js\onEvents.js:79</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>当HTML编辑器内容有改变时调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">cm</code>
                        <span class="type">CodeMirror</span>
                    

                    

                    <div class="param-description">
                        <p>CodeMirror 实例，当前的HTML编辑器</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onJsCursorActivity" class="method item">
    <h3 class="name"><code>onJsCursorActivity</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>cm</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l115"><code>js\onEvents.js:115</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>当Js编辑器中光标变动时调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">cm</code>
                        <span class="type">CodeMirror</span>
                    

                    

                    <div class="param-description">
                        <p>CodeMirror 实例，当前的JavaScript编辑器</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onJsEditorChange" class="method item">
    <h3 class="name"><code>onJsEditorChange</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>cm</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l88"><code>js\onEvents.js:88</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>当JavaScript编辑器视图内容变化时调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">cm</code>
                        <span class="type">CodeMirror</span>
                    

                    

                    <div class="param-description">
                        <p>CodeMirror 实例，当前的JavaScript编辑器</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onMenuViewInit" class="method item">
    <h3 class="name"><code>onMenuViewInit</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>menu</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l16"><code>js\onEvents.js:16</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>当顶部菜单视图初始化或重置后调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">menu</code>
                        <span class="type"><a href="..\classes\Menu.html" class="crosslink">Menu</a></span>
                    

                    

                    <div class="param-description">
                        <p>菜单模块实例</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_onScriptImport" class="method item">
    <h3 class="name"><code>onScriptImport</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>script</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="..&#x2F;files&#x2F;js_onEvents.js.html#l70"><code>js\onEvents.js:70</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>当引入脚本时调用</p>
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">script</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>如果当前是从toolbar区域引入的则返回脚本的唯一标识，否则则返回引入的脚本链接地址</p>
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
            </div>
        

        

        

        
    </div>
</div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="..&#x2F;assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="..&#x2F;assets/js/yui-prettify.js"></script>
<script src="..&#x2F;assets/../api.js"></script>
<script src="..&#x2F;assets/js/api-filter.js"></script>
<script src="..&#x2F;assets/js/api-list.js"></script>
<script src="..&#x2F;assets/js/api-search.js"></script>
<script src="..&#x2F;assets/js/apidocs.js"></script>
</body>
</html>
